package com.jeesite.common.utils.excel.fieldtype;

import java.util.List;

import org.springframework.util.StringUtils;

import com.jeesite.modules.edu.entity.EduSubject;
import com.jeesite.modules.sys.utils.EduUtils;

public class SubjectType {
	public static String setValue(Object sr) {
		if (StringUtils.isEmpty(sr)) {
			return "";
		}

		List<EduSubject> list = EduUtils.getEduSubjectAllList();

		for (EduSubject edu : list) {
			if (edu.getId().equals(((EduSubject) sr).getId())) {
				return edu.getTreeNames();
			}
		}

		return "";
	}
}
